﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FTchina;
using FTchina.SMSServer;
using FTchina.SMS;
using System.Data;

public partial class UI_MakeSMS : System.Web.UI.Page
{
    string CustomerName = string.Empty;
    string CustomerSex = string.Empty;
    string DinnerZao = string.Empty;
    string DinnerZhong = string.Empty;
    string DinnerWan = string.Empty;
    string Room = string.Empty;
    string Content = string.Empty;
    string GroupID = string.Empty;
    string zaoDate = string.Empty;
    string zhongDate = string.Empty;
    string wanDate = string.Empty;
    string selfdate = string.Empty;
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (FTchina.basic.SafeRequest(Request["cn"]).Length > 0)
        { 
        CustomerName = FTchina.basic.SafeRequest(Request["cn"]);
        CustomerSex = FTchina.basic.SafeRequest(Request["cs"]);
        DinnerZao = Server.UrlDecode(FTchina.basic.SafeRequest(Request["zao"]));
        DinnerZhong = Server.UrlDecode(FTchina.basic.SafeRequest(Request["zhong"]));
        DinnerWan = Server.UrlDecode(FTchina.basic.SafeRequest(Request["wan"]));
        Room = Server.UrlDecode(FTchina.basic.SafeRequest(Request["r"]));
        zaoDate = Server.UrlDecode(FTchina.basic.SafeRequest(Request["zaodate"]));
        zhongDate = Server.UrlDecode(FTchina.basic.SafeRequest(Request["zhongdate"]));
        wanDate = Server.UrlDecode(FTchina.basic.SafeRequest(Request["wandate"]));
        selfdate = Server.UrlDecode(FTchina.basic.SafeRequest(Request["selfdate"]));

        Response.Write(SMSSender.GetSmsResult(CustomerName, CustomerSex, DinnerZao, DinnerZhong, DinnerWan, Room, zaoDate, zhongDate, wanDate, selfdate));
        }
        if (FTchina.basic.SafeRequest(Request["tc"]).Length > 0)
        {
            Content = FTchina.basic.SafeRequest(Request["tc"]);
            Response.Write(SMSSender.GetSmsByCustomerID(CustomerInfo.GetLastCustomerID(), Content));
        }
        if (FTchina.basic.SafeRequest(Request["gp"]).Length > 0)
        {
            GroupID = FTchina.basic.SafeRequest(Request["gp"]);
           
            Response.Write(CustomerInfo.GetCustomerNamesByGroupID(GroupID));
        }

    }

    





}